<template>
  <div>
    <titleHead :title="'政务云平台'" />
    <!-- <el-col :span="12">
  <lineAndBar :height="'30vh'"/>
    </el-col> -->
    <el-col :span="22" v-for="item in 3" :key="item">
      <titleCard :cockpitData="dataArray[item-1]" />
    </el-col>
  </div>
</template>

<script>
import img from "./img/1@2x.png";
import lineAndBar from "@/components/echart/lineAndBar";
import Echart from "@/common/echart";
export default {
  data() {
    return {
      dataArray:[],
      img,
      options: {
        title: {
          text: "World Population",
        },
        tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "shadow",
          },
        },
        legend: {},
        grid: {
          left: "3%",
          right: "4%",
          bottom: "3%",
          containLabel: true,
        },
        xAxis: {
          type: "value",
          boundaryGap: [0, 0.01],
        },
        yAxis: {
          type: "category",
          data: [
            "甘州区",
            "民乐县",
            "临泽县",
            "高台县",
            "山丹县",
            "肃南裕固族自治县",
          ],
        },
        series: [
          {
            name: "接入单位量",
            type: "bar",
            data: [19325, 23438, 31000, 121594, 134141, 681807],
          },
          {
            name: "可存储能力(TB0)",
            type: "bar",
            data: [19325, 23438, 31000, 121594, 134141, 681807],
          },
          {
            name: "计算能力(VCPU)",
            type: "bar",
            data: [19325, 23438, 31000, 121594, 134141, 681807],
          },
        ],
      },
    };
  },
  components: { Echart },
   mounted(){
    this.getInfor()
  },
   methods: {
    getInfor() {
      this.getInfo({ key: "8-6-1" }).then(res=>{
            res.cockpitData.map(e=>{
              this.dataArray.push(e)
            })
      });
    },
  },
};
</script>

<style>
</style>